import { createApp } from 'vue'
import App from './App.vue'
import 'normalize.css'
import router from './router'
import { store, key } from './store'
import './styles/iconfont.css'
import './styles/base.css'
import registerComponent from './components/index'
import Common from './common'
import VConsole from 'vconsole'
import Modal from './plugins/modal'
import Toast from './plugins/toast'
import ActionSheet from './plugins/action-sheet'
import Popup from './plugins/popup'

new VConsole({ maxLogNumber: 5000 })

const app = createApp(App)

registerComponent(app)
app.config.globalProperties.$common = new Common()

app
	.use(store, key)
	.use(router)
	.use(Modal)
	.use(Toast)
	.use(ActionSheet)
	.use(Popup)
	.mount('#app')
